GGGGLLLL____PPPPIIIIXXXXEEEELLLL____TTTTEEEEXXXX____GGGGEEEENNNN____AAAALLLLPPPPHHHHAAAA____MMMMSSSS____SSSSGGGGIIIIXXXX, or GGGGLLLL____PPPPIIIIXXXXEEEELLLL____TTTTEEEEXXXX____GGGGEEEENNNN____AAAALLLLPPPPHHHHAAAA____LLLLSSSS____SSSSGGGGIIIIXXXX.
The default value is GGGGLLLL____NNNNOOOONNNNEEEE.
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
The pixel texgen function is enabled by calling ggggllllEEEEnnnnaaaabbbblllleeee and disabled by
calling ggggllllDDDDiiiissssaaaabbbblllleeee with GGGGLLLL____PPPPIIIIXXXXEEEELLLL____TTTTEEEEXXXX____GGGGEEEENNNN____SSSSGGGGIIIIXXXX. Pixel texgen affects the
result of the ggggllllDDDDrrrraaaawwwwPPPPiiiixxxxeeeellllssss and ggggllllCCCCooooppppyyyyPPPPiiiixxxxeeeellllssss commands. It allows the
color components of pixel groups to be used as texture coordinates,
effectively converting a color image into a texture coordinate image.
Because texture mapping is essentially a multidimensional table lookup,
this conversion supports multidimensional color lookups for images. Such
multidimensional lookups can be used to implement very accurate color
space conversions.
When pixel texgen is enabled, the red, green, blue, and alpha components
are used to generate s, t, r, and q texture coordinates, respectively. If
a valid texture has been defined, and texture-mapping enabled, these
texture coordinates will produce, in effect, a function of the color
components, which can then be blended with the original color components,
according to the texture environment blend function.
Alternatively, this mode command can be used to replace the fragment
color with the current raster position's color values. For example,
calling ggggllllPPPPiiiixxxxeeeellllTTTTeeeexxxxGGGGeeeennnnSSSSGGGGIIIIXXXX with GGGGLLLL____AAAALLLLPPPPHHHHAAAA will cause the fragment alpha to
be the alpha of the current raster position.
A useful mode of pixel texture is to have a pixel group with the external
format GGGGLLLL____RRRRGGGGBBBBAAAA index into a 3D texture, and have the alpha component
combined with the texel output. In this case the internal format of the
texture must have alpha, and that alpha can be replaced by the "incoming"
alpha by calling ggggllllPPPPiiiixxxxeeeellllTTTTeeeexxxxGGGGeeeennnnSSSSGGGGIIIIXXXX with the parameter
GGGGLLLL____PPPPIIIIXXXXEEEELLLL____TTTTEEEEXXXX____GGGGEEEENNNN____AAAALLLLPPPPHHHHAAAA____RRRREEEEPPPPLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX. The "alpha replace" mode can be
turned off by calling ggggllllPPPPiiiixxxxeeeellllTTTTeeeexxxxGGGGeeeennnnSSSSGGGGIIIIXXXX with the parameter
GGGGLLLL____PPPPIIIIXXXXEEEELLLL____TTTTEEEEXXXX____GGGGEEEENNNN____AAAALLLLPPPPHHHHAAAA____NNNNOOOO____RRRREEEEPPPPLLLLAAAACCCCEEEE____SSSSGGGGIIIIXXXX, the default.
On the second pass, use the "alpha replace" mode (described above) to
combine the incoming alpha with the output (as well as using it in the
fourth dimensional texture lookup). The original alpha, however, is not
usable as a fractional interpolation value until it gets left-shifted by
the number of bits corresponding to the logarithm (base 2) of the q size
of 4D texture. The alpha can be effectively left-shifted using the
texture color table. Since the table has limited precision, a mode is
supplied which will left-shift the alpha by 4 bits before combining it
with the output. To use it call ggggllllPPPPiiiixxxxeeeellllTTTTeeeexxxxGGGGeeeennnnSSSSGGGGIIIIXXXX with the parameter
GGGGLLLL____PPPPIIIIXXXXEEEELLLL____TTTTEEEEXXXX____GGGGEEEENNNN____AAAALLLLPPPPHHHHAAAA____LLLLSSSS____SSSSGGGGIIIIXXXX. The default, with no left shift, is
GGGGLLLL____PPPPIIIIXXXXEEEELLLL____TTTTEEEEXXXX____GGGGEEEENNNN____AAAALLLLPPPPHHHHAAAA____MMMMSSSS____SSSSGGGGIIIIXXXX (MS and LS refer to "most significant" and
"least significant"). This produces excellent results for 8 and 12 bit
components, for different texture q sizes.
EEEERRRRRRRROOOORRRRSSSS
GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated when _m_o_d_e is not an accepted defined value.
ggggllllPPPPiiiixxxxeeeellllTTTTeeeexxxxGGGGeeeennnnSSSSGGGGIIIIXXXX is supported only on HHHHiiiigggghhhh IIIImmmmppppaaaacccctttt and MMMMaaaaxxxxiiiimmmmuuuummmm IIIImmmmppppaaaacccctttt
systems; however, only 3D and 4D textures can be used.
On HHHHiiiigggghhhh IIIImmmmppppaaaacccctttt and MMMMaaaaxxxxiiiimmmmuuuummmm IIIImmmmppppaaaacccctttt systems, the effect of the current
raster position's color is not taken into account, as if the color is
white, with full alpha. Also, the default and only supported mode is
GGGGLLLL____RRRRGGGGBBBBAAAA, meaning that the fragment color is limited to this constant
color. Additional functionality is provided in the
SSSSGGGGIIIIXXXX____iiiimmmmppppaaaacccctttt____ppppiiiixxxxeeeellll____tttteeeexxxxttttuuuurrrreeee extension on HHHHiiiigggghhhh IIIImmmmppppaaaacccctttt and MMMMaaaaxxxxiiiimmmmuuuummmm IIIImmmmppppaaaacccctttt
systems.
On HHHHiiiigggghhhh IIIImmmmppppaaaacccctttt and MMMMaaaaxxxxiiiimmmmuuuummmm IIIImmmmppppaaaacccctttt systems, ggggllllPPPPiiiixxxxeeeellllTTTTeeeexxxxGGGGeeeennnnSSSSGGGGIIIIXXXX for
ggggllllCCCCooooppppyyyyPPPPiiiixxxxeeeellllssss is not supported.